package demo;

public class Poker {
    private String suit;//颜色
    private int rank;//数字

    public Poker(String suit, int rank) {
        this.suit = suit;
        this.rank = rank;
    }
//由于这个类当中的属性是用private分装起来的，所以给两个属性提供get和set方法。
    public String getSuit() {
        return suit;
    }

    public void setSuit(String suit) {
        this.suit = suit;
    }

    public int getRank() {
        return rank;
    }

    public void setRank(int rank) {
        this.rank = rank;
    }

    @Override
    public String toString() {
        return "{"+suit+" "+rank+"}";
    }
}
